cmake_minimum_required(VERSION 3.5)
project(test_target)

add_executable(test_target test_target.cpp)

set_property(TARGET test_target PROPERTY CXX_STANDARD 17)
# set_property(TARGET test_target PROPERTY TVAR "123")
# get_property(var TARGET test_target PROPERTY TVAR)

set_property(TARGET test_target PROPERTY COMPILE_DEFINITIONS "Q= \"123\"")# 注意：Q="123"等号前面不能有空格